using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Versions
{
    /// <summary>
    /// <para>Change Version</para>
    /// <para>Modifies the workspace of a  layer or table view to connect to the specified version.</para>
    /// <para>修改图层或表视图的工作空间以连接到指定版本。</para>
    /// </summary>    
    [DisplayName("Change Version")]
    public class ChangeVersion : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ChangeVersion()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Layer</para>
        /// <para><xdoc>
        ///   <para>The layer or table view that will connect to the specified version.</para>
        ///   <para>The sublayers of a topology layer, parcel layer, utility network layer, or trace network layer are not valid inputs.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将连接到指定版本的图层或表视图。</para>
        ///   <para>拓扑图层、宗地图层、公共设施网络图层或追踪网络图层的子图层不是有效输入。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_version_type">
        /// <para>Version Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of version to which the input feature layer will connect.</para>
        ///   <bulletList>
        ///     <bullet_item>Traditional version—Connect to a defined state of the database (traditional version).</bullet_item><para/>
        ///     <bullet_item>Historical version—Connect to a version representing a defined moment in time, often specified by a time or historical marker.</bullet_item><para/>
        ///     <bullet_item>Branch version—Connect to a branch version.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入要素图层将连接到的版本类型。</para>
        ///   <bulletList>
        ///     <bullet_item>传统版本 - 连接到数据库的定义状态（传统版本）。</bullet_item><para/>
        ///     <bullet_item>历史版本 - 连接到表示已定义时刻的版本，通常由时间或历史标记指定。</bullet_item><para/>
        ///     <bullet_item>分支版本 - 连接到分支版本。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public ChangeVersion(object _in_features, _version_type_value _version_type)
        {
            this._in_features = _in_features;
            this._version_type = _version_type;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Change Version";

        public override string CallName => "management.ChangeVersion";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_features, _version_type.GetGPValue(), _version_name, _date, _out_feature_layer, _include_participating.GetGPValue()];

        /// <summary>
        /// <para>Input Layer</para>
        /// <para><xdoc>
        ///   <para>The layer or table view that will connect to the specified version.</para>
        ///   <para>The sublayers of a topology layer, parcel layer, utility network layer, or trace network layer are not valid inputs.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将连接到指定版本的图层或表视图。</para>
        ///   <para>拓扑图层、宗地图层、公共设施网络图层或追踪网络图层的子图层不是有效输入。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Version Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of version to which the input feature layer will connect.</para>
        ///   <bulletList>
        ///     <bullet_item>Traditional version—Connect to a defined state of the database (traditional version).</bullet_item><para/>
        ///     <bullet_item>Historical version—Connect to a version representing a defined moment in time, often specified by a time or historical marker.</bullet_item><para/>
        ///     <bullet_item>Branch version—Connect to a branch version.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入要素图层将连接到的版本类型。</para>
        ///   <bulletList>
        ///     <bullet_item>传统版本 - 连接到数据库的定义状态（传统版本）。</bullet_item><para/>
        ///     <bullet_item>历史版本 - 连接到表示已定义时刻的版本，通常由时间或历史标记指定。</bullet_item><para/>
        ///     <bullet_item>分支版本 - 连接到分支版本。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Version Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _version_type_value _version_type { get; set; }

        public enum _version_type_value
        {
            /// <summary>
            /// <para>Traditional version</para>
            /// <para>Traditional version—Connect to a defined state of the database (traditional version).</para>
            /// <para>传统版本 - 连接到数据库的定义状态（传统版本）。</para>
            /// </summary>
            [Description("Traditional version")]
            [GPEnumValue("TRANSACTIONAL")]
            _TRANSACTIONAL,

            /// <summary>
            /// <para>Branch version</para>
            /// <para>Branch version—Connect to a branch version.</para>
            /// <para>分支版本 - 连接到分支版本。</para>
            /// </summary>
            [Description("Branch version")]
            [GPEnumValue("BRANCH")]
            _BRANCH,

            /// <summary>
            /// <para>Historical version</para>
            /// <para>Historical version—Connect to a version representing a defined moment in time, often specified by a time or historical marker.</para>
            /// <para>历史版本 - 连接到表示已定义时刻的版本，通常由时间或历史标记指定。</para>
            /// </summary>
            [Description("Historical version")]
            [GPEnumValue("HISTORICAL")]
            _HISTORICAL,

        }

        /// <summary>
        /// <para>Version Name</para>
        /// <para>The name of the version to which the input feature layer will connect. This parameter is optional if you're using a historical version.</para>
        /// <para>输入要素图层将连接到的版本的名称。如果使用的是历史版本，则此参数是可选的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Version Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _version_name { get; set; } = null;


        /// <summary>
        /// <para>Date and Time</para>
        /// <para>The date of the historical version to which the input feature layer will connect.</para>
        /// <para>输入要素图层将连接到的历史版本的日期。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Date and Time")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _date { get; set; } = null;


        /// <summary>
        /// <para>Output Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_layer { get; set; }


        /// <summary>
        /// <para>Include participating classes of controller dataset</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the workspace of participating classes will also change.</para>
        ///   <para>The parameter is only applicable when the input layer is a topology layer, parcel layer, utility network layer, or trace network layer.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The version of the participating classes of the controller dataset will change if they are from the same workspace as the controller dataset. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Only the version of the controller dataset will change.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定参与类的工作空间是否也会更改。</para>
        ///   <para>仅当输入图层为拓扑图层、宗地图层、公共设施网络图层或追踪网络图层时，该参数才适用。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 如果控制器数据集的参与类与控制器数据集来自同一工作空间，则它们的版本将发生更改。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 仅控制器数据集的版本会更改。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include participating classes of controller dataset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _include_participating_value _include_participating { get; set; } = _include_participating_value._true;

        public enum _include_participating_value
        {
            /// <summary>
            /// <para>INCLUDE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INCLUDE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>EXCLUDE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EXCLUDE")]
            [GPEnumValue("false")]
            _false,

        }

        public ChangeVersion SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}